﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wanet.PublicPortal.Common.Domain
{
	public class WebLayout: BasePersistentItem
	{
		/// <summary>
		/// Gets or sets the name of the layout.
		/// </summary>
		/// <value>The name of the layout.</value>
		public virtual string LayoutName
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the layout image URL.
		/// </summary>
		/// <value>The layout image URL.</value>
		public virtual string LayoutImageUrl
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the sections.
		/// </summary>
		/// <value>The sections.</value>
		public virtual string Sections
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the master page.
		/// </summary>
		/// <value>The master page.</value>
		public virtual string MasterPage
		{
			get;
			set;
		}

		/// <summary>
		/// Gets the sections array.
		/// </summary>
		/// <returns></returns>
		public virtual IList<string> GetSections()
		{
			return Sections.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList<string>();
		}
	}
}
